/*
 * @Author: nexox 2685853507@qq.com
 * @Date: 2024-11-26 11:15:34
 * @LastEditors: nexox 2685853507@qq.com
 * @LastEditTime: 2024-11-26 11:30:43
 * @FilePath: \pytorch_workplace\matrix\w12\kh3.cpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include <stdio.h>
#include <string.h>

int check(char *s, int f, int t) {
    int len = t - f + 1;
    if (len % 2 == 1)
        return 1;
    else {
        int p1 = f, p2 = t;
        while (p1 < p2) {
            if (s[p1] != s[p2])
                return 1;
            p1++;
            p2--;
        }
        return check(s, f, (f + t) / 2) + check(s, (f + t) / 2 + 1, t);
    }
}

int main() {
    char s[11451];
    scanf("%s", s);
    printf("%d", check(s, 0, strlen(s) - 1));
}